﻿// ***********************************************************************
// Assembly         : ElFinder.Net
// Author           : Lolo
// Created          : 06-05-2013
//
// Last Modified By : Lolo
// Last Modified On : 06-05-2013
// ***********************************************************************
// <copyright file="IDriver.cs" company="">
//     Copyright (c) . All rights reserved.
// </copyright>
// <summary></summary>
// ***********************************************************************
using System.Collections.Generic;
using System.Web.Mvc;
using System.Web;

namespace ElFinder
{
    /// <summary>
    /// Interface IDriver
    /// </summary>
    public interface IDriver
    {
        /// <summary>
        /// Opens the specified target.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="tree">if set to <c>true</c> [tree].</param>
        /// <returns>JsonResult.</returns>
        JsonResult Open(string target, bool tree);
        /// <summary>
        /// Inits the specified target.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <returns>JsonResult.</returns>
        JsonResult Init(string target);
        /// <summary>
        /// Parentses the specified target.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <returns>JsonResult.</returns>
        JsonResult Parents(string target);
        /// <summary>
        /// Trees the specified target.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <returns>JsonResult.</returns>
        JsonResult Tree(string target);
        /// <summary>
        /// Lists the specified target.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <returns>JsonResult.</returns>
        JsonResult List(string target);
        /// <summary>
        /// Makes the dir.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="name">The name.</param>
        /// <returns>JsonResult.</returns>
        JsonResult MakeDir(string target, string name);
        /// <summary>
        /// Makes the file.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="name">The name.</param>
        /// <returns>JsonResult.</returns>
        JsonResult MakeFile(string target, string name);
        /// <summary>
        /// Renames the specified target.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="name">The name.</param>
        /// <returns>JsonResult.</returns>
        JsonResult Rename(string target, string name);
        /// <summary>
        /// Removes the specified targets.
        /// </summary>
        /// <param name="targets">The targets.</param>
        /// <returns>JsonResult.</returns>
        JsonResult Remove(IEnumerable<string> targets);
        /// <summary>
        /// Duplicates the specified targets.
        /// </summary>
        /// <param name="targets">The targets.</param>
        /// <returns>JsonResult.</returns>
        JsonResult Duplicate(IEnumerable<string> targets);
        /// <summary>
        /// Gets the specified target.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <returns>JsonResult.</returns>
        JsonResult Get(string target);
        /// <summary>
        /// Puts the specified target.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="content">The content.</param>
        /// <returns>JsonResult.</returns>
        JsonResult Put(string target, string content);
        /// <summary>
        /// Pastes the specified source.
        /// </summary>
        /// <param name="source">The source.</param>
        /// <param name="dest">The dest.</param>
        /// <param name="targets">The targets.</param>
        /// <param name="isCut">if set to <c>true</c> [is cut].</param>
        /// <returns>JsonResult.</returns>
        JsonResult Paste(string  source, string dest, IEnumerable<string> targets, bool isCut);
        /// <summary>
        /// Uploads the specified target.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="targets">The targets.</param>
        /// <returns>JsonResult.</returns>
        JsonResult Upload(string target, HttpFileCollectionBase targets);
        /// <summary>
        /// Parses the path.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <returns>FullPath.</returns>
        FullPath ParsePath(string target);
    }
}